var express = require('express');
var router = express.Router();
let {addBanner,searchBanner,updateBanner,deleteBanner}=require('../serve/bannerServe')

router.post('/addBanner',async(req,res,next)=>{
    let result=await addBanner(req.body)
    res.send(result)
})

router.get('/searchBanner',async(req,res,next)=>{
    let result=await searchBanner(req.query)
    res.send(result)
})
router.post('/updateBanner',async(req,res,next)=>{
    let result=await updateBanner(req.body)
    res.send(result)
})
router.post('/deleteBanner',async(req,res,next)=>{
    let result=await deleteBanner(req.body)
    res.send(result)
})

module.exports=router